package com.googlecode.androidkurskoblenz.jledcube;

import java.awt.Color;
import java.util.Observable;

import javax.media.j3d.TransformGroup;

/**
 * Is a led row (which contains the single leds)
 */
public class LedRow
{
	private Led[] leds;
	@SuppressWarnings("unused")
	private int z, y;
	
	public LedRow(int z, int y, int width, float size, TransformGroup group, Observable cube, Color cubeColor)
	{
		this.leds = new Led[width];
		this.z = z;
		this.y = y;
		
		for(int x = 0; x < width; x++)
		{
			Led led = new Led(z, y, x, size, group, cubeColor);
			cube.addObserver(led);
			this.leds[x] = led;
		}
	}
	
	public void setPos(int y, int z)
	{
		this.y = y;
		this.z = z;
	}
}
